Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function |wrapping_neg

std/ops/num::|wrapping_neg


Usage

|wrapping_neg<N>(val)

Generics

◻ N: WrappingNeg

Parameters

↳ val: N

Return

N


Return negation of given value, wrapping on bounds.

This function is infaillible and wrap if -val reach boundary of the data type.